<template>
  <div class="login">
     <button @click="btnclick">登录</button>
  </div>
</template>
<script>
import { useRouter } from 'vue-router'
export default {
  setup () {
    const router = useRouter()
    const btnClick = () => {
      window.localStorage.setItem('key1', 30)
      router.push({
        path: '/home'
      })
    }
    return {
      btnClick
    }
  }
}
</script>
<style scoped>
</style>
